import java.util.Scanner;

public class Main {
    public static void main0(String[] args) {
        System.out.print("     ");
        System.out.println("**");
        System.out.print("     ");
        System.out.println("**");
        System.out.println("************");
        System.out.println("************");
        System.out.print("    ");
        System.out.println("*  *");
        System.out.print("    ");
        System.out.println("*  *");
    }
    //牛牛刚刚出生，嗷嗷待哺，一开始他只能学说简单的数字，你跟他说一个整数，他立刻就能学会。
    //
    //输入一个整数，输出这个整数。
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(n);
    }
    //会说整数之后，牛牛开始尝试浮点数（小数）
    //
    //输入一个浮点数，输出这个浮点数。
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextDouble();
        System.out.println(n);
    }

    public static void main3(String[] args) {
            Scanner scanner = new Scanner(System.in);
            String s = scanner.nextLine();
            System.out.println(s);
        }
        //牛牛从键盘上输入三个整数，并尝试在屏幕上显示第二个整数。
        public static void main4(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int count = 0;
            while(count<3){
                int n = scanner.nextInt();
                count++;
                if(count==2){
                    System.out.println(n);
                }
            }
        }
//牛牛尝试用键盘读入一个字符，然后在屏幕上显示用这个字符组成的 3*3 的矩形。
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.nextLine();
        int i = 0;
        int j = 0;
        for(i = 0;i < 3;i++){
            for(j = 0;j < 3;j++){
                System.out.print(a);
            }
            System.out.println("\n");
        }

    }

    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String n = scanner.nextLine();
        int i = 0;
        int j = 0;
        for(i = 0;i<4;i++){
            for(j = 0;j<4;j++){

            }
        }
    }

    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String n = scanner.nextLine();
        int i = 0;
        int j = 0;
        int k = 0;
        for(i = 0;i < 3;i++){
            for(j = 0;j < 2-i;j++){
                System.out.print(" ");
            }
            for(k = 0;k<(2*i+1);k++){
                System.out.print(n);
            }
            System.out.println("\n");
        }
        for(i = 0;i<2;i++){
            for(j = 0;j<i+1;j++){
                System.out.print(" ");
            }
            for(k = 0;k<(3-2*i);k++){
                System.out.print(n);
            }
            System.out.println("\n");
        }
    }

    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double n = scanner.nextDouble();
        int a = (int)n;
        if(a>=0){
            if(n-a>0.5){
                a++;
                System.out.println(a);
            }else{
                System.out.println(a);
            }
        }else{
            if(a-n>0.5){
                a--;
                System.out.println(a);
            }else{
                System.out.println(a);
            }
        }

    }

    public static void main9(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num1 = scanner.nextInt();
        int num2 = scanner.nextInt();
        int num3 = scanner.nextInt();
        System.out.println("score1="+num1+",score2="+num2+",score3="+num3);
    }

    public static void main10(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(n*100);
    }

    public static void main11(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a = scanner.nextInt();
        System.out.print(n/a);
        System.out.println(" ");
        System.out.print(n%a);
    }

    public static void main12(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(n%10);
    }

    public static void main13(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println((n%100)/10);
    }

    public static void main14(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int n = scanner.nextInt();
        x=(x+n%7)%7;
        System.out.println(x);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int num1 = num/3600;
        num%=3600;
        int num2 = num/60;
        int num3 = num%60;
        System.out.println(num1+" "+num2+" "+num3);
    }
}



























